package com.fc.commons.security;

import org.springframework.util.Base64Utils;

public class Base64Util {

	/** 
     * BASE64解密
     *  
     * @param key 
     * @return 
     */  
    public static byte[] decryptBASE64(String key){
    	return Base64Utils.decode(key.getBytes());
    }
	
    /**
     * BASE64加密
     * @param key
     * @return
     */
    public static String encryptBASE64(byte[] data){
    	return new String(Base64Utils.encode(data));
    }
}
